<%--
  Created by IntelliJ IDEA.
  User: 孙
  Date: 2020/11/3
  Time: 21:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>分数查询</title>
    <link rel="stylesheet" href="../../resources/layui/css/layui.css" />
</head>
<body>
<!-- 搜索条件开始 -->
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>学生成绩</legend>
</fieldset>
<!-- 搜索条件结束 -->


<!-- 数据表格开始 -->
<table class="layui-hide" id="userTable" lay-filter="userTable"></table>

<!-- 数据表格结束 -->



<script type="text/javascript" src="../../resources/layui/layui.js" ></script>
<script type="text/javascript">
    layui.use([ 'jquery', 'layer', 'form', 'table','laydate' ], function() {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var table = layui.table;
        var laydate=layui.laydate;

        //绑定时间选择器
        laydate.render({
            elem:'#startTime'
        });
        laydate.render({
            elem:'#endTime'
        })


        //渲染数据表格
        var tableIns=table.render({
            elem: '#userTable'   //渲染的目标对象
            ,url:'${ctx}/read/readExcel.action' //数据接口
            ,title: '成绩数据表'//数据导出来的标题
            ,toolbar:"#userToolBar"   //表格的工具条
            ,height:'full-300'
            ,cellMinWidth:100 //设置列的最小默认宽度
            ,done:function(res, curr, count){

            }
            ,page: true  //是否启用分页
            ,cols: [[   //列表数据
                {type: 'checkbox', fixed: 'left'}
                ,{field:'id', title:'ID', sort:true}
                ,{field:'name', title:'用户名', sort:true,align:'center'}
                ,{field:'chineseScore', title:'语文成绩', sort:true,align:'center'}
                ,{field:'mathScore', title:'数学成绩', sort:true,align:'center'}
                ,{field:'englishScore', title:'英语成绩', sort:true,align:'center'}
                ,{field:'physicalScore', title:'物理成绩', sort:true,align:'center'}
                ,{field:'chemicalScore', title:'化学成绩', sort:true,align:'center'}
                ,{field:'geographyScore', title:'地理成绩', sort:true,align:'center'}

            ]]
        })
    });
</script>
</body>
</html>
